﻿<UserControl x:Class="BYS.XiAnComDept.App.Pages.CompanyEdit"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">
    <Grid Style="{StaticResource ContentRoot}">
        <ScrollViewer>
            <StackPanel MinWidth="200">
                <TextBlock Name="TextTitle" Text="单位信息修改" Style="{StaticResource Heading2}" />
                <Grid HorizontalAlignment="Left" Name="GridForm">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition MinWidth="120" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.Resources>
                        <Style TargetType="RowDefinition">
                            <Setter Property="Height" Value="30"></Setter>
                        </Style>
                        <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
                            <Setter Property="Height" Value="22" />
                            <Setter Property="Width" Value="500"/>
                            <Setter Property="VerticalAlignment" Value="Center"/>
                            <Setter Property="HorizontalAlignment" Value="Left"/>
                            <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTemplate}" />
                        </Style>
                        <Style TargetType="TextBlock">
                            <Setter Property="VerticalAlignment" Value="Center"/>
                        </Style>
                    </Grid.Resources>
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="单位名称："></TextBlock>
                    <TextBox Grid.Row="0" Grid.Column="1" Name="TextBoxCompanyName"
                             Text="{Binding Path=CompanyName, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True}"></TextBox>
                    <TextBlock Grid.Row="1" Grid.Column="0"  Text="曾用    名："></TextBlock>
                    <TextBox Grid.Row="1" Grid.Column="1" Name="TextBoxCompanyPreName" IsReadOnly="True"
                             Text="{Binding Path=CompanyPreName, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True}"></TextBox>
                    <Button Grid.Row="2" Grid.Column="1"   Name="ButtonSave" Content="保存" Width="100" Margin="-150,0,0,0" Click="ButtonSave_Click"></Button>
                    <Button Grid.Row="2" Grid.Column="1"   Name="ButtonDelete" Content="删除" Width="100" Margin="150,0,0,0" Click="ButtonDelete_Click"></Button>
                </Grid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
